package Zhan;

public interface IStack {
    // 压栈
    public void push(Object x) throws Exception;

    // 出栈
    public Object pop() throws Exception;

    // 获取栈顶元素
    public Object peek() throws Exception;

    // 判定栈是否为空
    public boolean isEmpty();

    // 获取栈中元素个数
    public int length();

    // 打印栈数据元素
    public void display();

}
